home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / utils1 / js_pack2.arj / JS-FIELD.TXT < prev    next >
Text File  |  1994-03-21  |  11KB  |  310 lines

  1. JS-FIELD Utility Program Documentation
  2. (Ver 5.0)
  3.  
  4. Author: Johnathan Mark Smith
  5.  
  6.  
  7. THE OLD DISCLAIMER
  8.  
  9.   This software and manual are sold "as is" and without warranties
  10.   as to performance or merchant ability or any other warranties
  11.   whether expressed or implied. Because of the various hardware and
  12.   software environments into which this program may be put, no
  13.   warranty of fitness for a particular purpose is offered.
  14.  
  15.   The user must assume the entire risk of using and evaluating this
  16.   program. Any liability of  Johnathan Mark Smith Technology will be
  17.   limited exclusively to product replacement or refund of purchase
  18.   price. If you find these terms unacceptable, do not use this
  19.   product.
  20.  
  21. Introduction
  22.  
  23.  
  24.     programmers are frequently asked to extract and format
  25.  data for the PC.  It is not enough for the programmer simply to 
  26. pull off the records of interest to the user.  Usually, the records must be
  27. formatted to create a set of fields appropriate for "importing"
  28. into the PC worksheet.  In a typical company, hundreds of man-hours
  29. are spent each year in creating the small ad-hoc programs required
  30. to generate such data.
  31.  
  32.  The JS-FIELD utility greatly simplifies the task of manipulating
  33.  data for use in a PC environment.  JS-FIELD provides the following
  34.  features:
  35.  
  36.  1.  Selective extraction of fields from an input record
  37.  
  38.  2.  Data output in either delimited ASCII or non-delimited ASCII
  39.      format.
  40.  
  41.  3.  Selectable column position ordering of extracted fields.
  42.  
  43.  4.  Ability to write the same input data into multiple output
  44.      fields.
  45.  
  46.  5.  Record selection capability based on record field contents.
  47.  
  48.  6.  Optional output record count limit parameter.
  49.  
  50.  7.  Formatting of string field with quote marks and numeric
  51.      fields with explicit zeros.
  52.  
  53.  8.  Suppression of unwanted characters within selected fields.
  54.  
  55.  9.  Creation of constant string output fields.
  56.  
  57. 10.  Conversion data from EBCDIC to ASCII format.
  58.  
  59. 11.  Drops Dollar signs and commas in numeric fields.
  60.  
  61.  
  62.  
  63.     The JS-FIELD program must be provided with control information
  64. to govern its execution. This information is read from a control file. 
  65. The control file is a standard PC text file that can be created 
  66. with any ASCII text editor.
  67.  
  68.  To run JS-FIELD type at the prompt: JS-FIELD [options] <Control file name> .
  69.  
  70.  THE CONTROL FILE
  71.  ----------------
  72.  
  73.  The first line of the control file identifies the input file name.
  74.  
  75.  The second line of the control file identifies the output file name.
  76.  
  77.  Subsequent lines of the file provide field extraction control information.
  78.  Each field exaction control line contains the type of field ,starting byte
  79.  position of the field, length of the field and a mask if needed.
  80.  
  81.  The following sample control file illustrates how control
  82.  information is provided to the JS-FIELD program.
  83.  
  84.  Contents of a sample JS-FIELD control file, JS-FIELD.CTL:
  85.  
  86. C:\DATA\STC.TXT
  87. C:\DATA\only100.TXT
  88. c,2,4,<>,John
  89. n,10,1,=,1
  90. C,5,3
  91. N,24,0,<,10000
  92.  
  93.  
  94.  
  95. The input file name is C:\DATA\STC.TXT.
  96.  
  97. The output file name is C:\DATA\LESS100.TXT.
  98.  
  99. The first field extract control record (c,2,4,<>,John) indicates that
  100. the data to be extract is a string field(characters to be surrounded by
  101. quotes) will be extracted from byte position 2 and The logical length
  102. of the field is 4 characters. The selection data indicate that the input
  103. record will be discarded if the field value is equal to John.
  104.  
  105. The second field extract control record (n,10,1,=,1) indicates that the
  106. data to be extract is a numeric field and it will be extracted from
  107. byte position 10 and the logical length of the field is 1 character.
  108. The selection data indicate that the input record will be discarded
  109. if the field value is not equal to 1.
  110.  
  111. The field extract control record (C,5,3) indicates that the data to be
  112. extract is a string. The leading and trailing spaces will be removed because
  113. you used a Upper case 'C' character. The field will be extracted from
  114. byte position 5 and the logical length of the field is 3 characters
  115. long.
  116.  
  117. The field extract control record (N,24,7,<,10000) indicates that the data to
  118. be extract is a numeric field and it will removed leading zeros because
  119. you used a upper case 'N' character. The field will be extracted from
  120. byte position 24 and the 0 in the length field tells the program that this
  121. field goes all the way to the end of the record. So you don't have to know
  122. the logical length.
  123. If the field is not less then 10,000 the input record will be discarded.
  124.  
  125.  
  126. JS-FIELD Output field type codes
  127. -------------------------------
  128.  
  129.   The following are valid codes for designating output field types:
  130.  
  131. STRING FIELDS
  132. -------------
  133. 1) c (Lower case)   String field. (Surrounded by quotes).
  134.  
  135. 2) C (Upper case)   String field. (Surrounded by quotes, Leading and
  136.                     trailing spaces will be removed).
  137.  
  138. 3) u (Lower case)   String field. This will convert the string to
  139.                     all uppercase. (Surrounded by quotes).
  140.  
  141. 4) U (Upper case)   String field. This will convert the string to
  142.                     all uppercase. (Surrounded by quotes, Leading and
  143.                     trailing spaces will be removed).
  144.  
  145. 5) l (Lower case)   String field. This will convert the string to
  146.                     all lowercase. (Surrounded by quotes).
  147.  
  148. 6) L (Upper case)   String field. This will convert the string to
  149.                     all lowercase. (Surrounded by quotes, Leading and
  150.                     trailing spaces will be removed).
  151.  
  152. NUMERIC FIELDS
  153. --------------
  154. 1) n (Lower case)   Numeric field (Leading and trailing spaces will
  155.                     be removed).
  156.  
  157. 2) N (Upper case)   Numeric field (Leading and trailing spaces will
  158.                     be removed. also Leading zeros will be removed).
  159.  
  160. 3) f (Lower case)   Numeric field (Leading and trailing spaces will
  161.                     be removed. Also Dollar sign & comma's will
  162.                     be removed).
  163.  
  164. 4) F (Upper case)   Numeric field (Leading and trailing spaces will
  165.                     be removed. Also Leading zeros will be removed &
  166.                     Dollar sign & comma's will be removed).
  167.  
  168.  
  169. JS-FIELD Output file mask code
  170. _____________________________
  171.  
  172.   The following are valid codes for designating output field mask:
  173.  
  174. 1) <>               Take all record not equal to the value of the
  175.                     data field.
  176.  
  177. 2) <                Take all record less then the value of the data
  178.                     field.
  179.  
  180. 3) >                Take all record greater then the value of the
  181.                     data field.
  182.  
  183. 4) =                Take all record equal to the value of the data field.
  184.  
  185.  
  186.  
  187.  
  188. OPTIONS
  189. -------
  190. 1) -bz   This option will tell the utility that the input file is not
  191.          CRLF and the record length is z long, also make the output file
  192.          without CRLF.
  193.  
  194. 2) -Bz   This option will tell the utility that the input file is not
  195.          CRLF and the record length is z long, also this will add CRLF
  196.          to the output file.
  197.  
  198. 3) -ez   This option will tell the utility that the input file is EBCDIC
  199.          and the record length is z long, also make the output file ASCII
  200.          without CRLF.
  201.  
  202. 4) -Ez   This option will tell the utility that the input file is EBCDIC
  203.          and the record length is z long, also the output file will
  204.          be ASCII with CRLF..
  205.  
  206. 5) -A    This option will tell the utility that the input file is CRLF
  207.          but don't make the output CRLF.
  208.  
  209. 6) -d    This will tell the utility to make the output file delimited.
  210.  
  211. 7) -a    In some system a delimiter after the last field on the record
  212.          will be needed. This option will insert a delimiter after the
  213.          last field on each record.
  214.  
  215. 8) -nz   This option will tell the utility to only extract z number of
  216.          record(s).
  217.  
  218. 9) -s    This option will put the utility into fast and stealth mode.
  219.          fast and stealth mode will surpress the graph that shows on
  220.          the screen when JS-FIELD is executed and the counters will
  221.          only be displayed at program termination. The advantage
  222.          of using this option is that the utility will run
  223.          MUCH, MUCH FASTER.
  224.          (Try It !)
  225.  
  226. 10)-X    Turns off exiting on input data error.
  227.  
  228. 11) -k   To Delete input file on exit.
  229.  
  230. 12) -t   To beep on exit.
  231.  
  232. Registration
  233.  
  234.   I will keep improving the program if I know enough people are
  235.   finding it useful.
  236.  
  237.   My registration policy is very flexible. The nominal fee are listed
  238.   in the file REGISTER.TXT. If you don't feel you will get your money
  239.   worth of use out of JS-FIELD, send whatever it is worth to you.
  240.  
  241.   If you are impoverished and can't afford to pay anything,
  242.   enclose a stamped self-addressed envelope
  243.   and I will send you a registration.
  244.  
  245.   This is not freeware or public domain. Shareware is simply a means
  246.   of marketing commercial software. You are required to register if
  247.   you intend to use this program after a reasonable trial period.
  248.  
  249.   When registering, please tell me the version number you have 
  250.   and where you obtained your copy of JS-FIELD.
  251.  
  252.   See REGISTER.TXT for details.
  253.  
  254.   JS-FIELD should be registered for the maximum number of copies that
  255.   can be used simultaneously at your site. Site fees for commercial
  256.   users can be negotiated.
  257.  
  258.   If you register for the full fee, and enclose a Shipping and
  259.   Handling fee of $3 I will send you the latest versions of JS-FIELD and
  260.   Some Free Demo's.  if you decide to use it after a trial period. I will 
  261.   also send other File related shareware programs.
  262.  
  263.  
  264. Registered version features
  265.  
  266. * CUSTOM DEFAULT SETTINGS
  267.  
  268. * DISCOUNTS ON SHAREWARE
  269.  
  270.  
  271.  
  272.  
  273. Program Abort
  274.  
  275.     Hitting Control-C (or Control-Break) will terminate the program
  276.     immediately. 
  277.  
  278.  
  279. Distribution
  280.  
  281.     Permission is hereby given to copy and distribute this program
  282.     as long as no more than $5 is charged. It must be made clear to
  283.     the buyer that this is only a handling charge and not a
  284.     registration fee. You must include all files in their original
  285.     unmodified form when distributing this program. .
  286.  
  287.     Permission to distribute may be revoked by the Johnathan Mark Smith 
  288.     at any time for any reason.
  289.  
  290.     YOU MUST NOT DISTRIBUTE ANY COPY WHICH HAS BEEN BRANDED WITH
  291.     A REGISTRATION CODE. 
  292.  
  293. All trademarks used in this document are the property of their
  294. owners.
  295.  
  296.         -Johnathan Mark Smith-
  297.  
  298.  
  299. Questions or suggestions regarding JS-FIELD should be directed to the author
  300. at the following address:
  301.  
  302.     Johnathan Mark Smith
  303.     2039 85 STREET
  304.     BROOKLYN, NY 11214
  305.  
  306.     Telephone: 718-373-3886
  307.  
  308.  
  309.  
  310.